package com.yh.correct.model;

import java.util.Date;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 工作人员表对应实体类 t_personnel
 * 
 * @author Administrator
 *
 */
public class Personnel {
	/**
	 * 工作人员id
	 */
	private Integer id;
	/**
	 * 姓名
	 */
	@NotBlank(message="名字不能为空")
	private String name;
	/**
	 * 性别
	 */
	private String sex;
	/**
	 * 出生日期
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd") 
	private Date birthday;
	/**
	 * 证件号码
	 */
	@Pattern(regexp = "\\d{17}(\\d|X|x)",message="证件号码格式不正确")
	private String card;
	/**
	 * 文化程度
	 */
	private String degree;
	/**
	 * 政治面貌
	 */
	private String politic;
	/**
	 * 联系电话
	 */
	@Pattern(regexp = "\\d{11}|",message="手机号码格式不正确")
	private String phonenum;
	/**
	 * 工作单位
	 */
	private String org;
	/**
	 * 家庭地址
	 */
	private String address;
	/**
	 * 照片
	 */
	private String photo;
	/**
	 * 类别
	 */
	private String category;
	/**
	 * 职业
	 */
	private String profession;
	/**
	 * 状态
	 */
	private String status;
	/**
	 * 司法所id
	 */
	private Integer jid;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getCard() {
		return card;
	}

	public void setCard(String card) {
		this.card = card;
	}

	public String getDegree() {
		return degree;
	}

	public void setDegree(String degree) {
		this.degree = degree;
	}

	public String getPolitic() {
		return politic;
	}

	public void setPolitic(String politic) {
		this.politic = politic;
	}

	public String getPhonenum() {
		return phonenum;
	}

	public void setPhonenum(String phonenum) {
		this.phonenum = phonenum;
	}

	public String getOrg() {
		return org;
	}

	public void setOrg(String org) {
		this.org = org;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getProfession() {
		return profession;
	}

	public void setProfession(String profession) {
		this.profession = profession;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Integer getJid() {
		return jid;
	}

	public void setJid(Integer jid) {
		this.jid = jid;
	}

	@Override
	public String toString() {
		return "Personnel [id=" + id + ", name=" + name + ", sex=" + sex + ", birthday=" + birthday + ", card=" + card
				+ ", degree=" + degree + ", politic=" + politic + ", phonenum=" + phonenum + ", org=" + org
				+ ", address=" + address + ", photo=" + photo + ", category=" + category + ", profession=" + profession
				+ ", status=" + status + ", jid=" + jid + "]";
	}

}
